package com.ziroom.finance.rabbitmq.common.base;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.util.List;

/**
 * 用来返回给页面的对象
 * Created by duxiaokang on 2016/11/3.
 */
@JsonSerialize
public class PageListResult<T> {

    private List<T> list;

    private Integer totalCount;

    public List<T> getList() {
        return list;
    }

    public Integer getTotalCount() {
        return totalCount;
    }

    public PageListResult(List<T> list, int totalCount) {
        this.list = list;
        this.totalCount = totalCount;
    }

    public static <T> PageListResult<T> create(List<T> list, int totalCount) {
        return new PageListResult<T>(list, totalCount);
    }
}
